<div class="reeF-create">

  <form nz-form [formGroup]="validateForm" (ngSubmit)="_submitForm()">

    <!-- companyName -->
    <div nz-form-item nz-row [nzType]="'flex'" [nzJustify]="'center'">
      <div nz-form-label nz-col [nzXs]="24" [nzSm]="6" [nzMd]="2">
        <label for="companyName" nz-form-item-required>公司全称</label>
      </div>
      <div nz-form-control nz-col [nzXs]="20" [nzSm]="8" [nzMd]="6" nzHasFeedback [nzValidateStatus]="getFormControl('companyName')">
        <nz-input [nzType]="'text'" formControlName="companyName" [nzId]="'companyName'" (keyup)="setUserName()">
          <ng-template #prefix>
            <i class="anticon anticon-solution"></i>
          </ng-template>
        </nz-input>
        <div nz-form-explain *ngIf="getFormControl('companyName').dirty&&getFormControl('companyName').hasError('required')">此项为必填项</div>
      </div>
    </div>

    <!-- companyAd -->
    <div nz-form-item nz-row [nzType]="'flex'" [nzJustify]="'center'">
      <div nz-form-label nz-col [nzXs]="24" [nzSm]="6" [nzMd]="2">
        <label for="companyAd" nz-form-item-required>公司地址</label>
      </div>
      <div nz-form-control nz-col [nzXs]="20" [nzSm]="8" [nzMd]="6" nzHasFeedback [nzValidateStatus]="getFormControl('companyAd')">
        <nz-input [nzType]="'text'" [(ngModel)]="companyAd" formControlName="companyAd" [nzDisabled]="'true'" [nzId]="'companyAd'">
          <ng-template #prefix>
            <i class="anticon anticon-environment-o"></i>
          </ng-template>
        </nz-input>
        <div nz-form-explain *ngIf="getFormControl('companyAd').dirty&&getFormControl('companyAd').hasError('required')">此项为必填项</div>
      </div>
    </div>


    <!-- 联系人姓名 -->
    <div nz-form-item nz-row [nzType]="'flex'" [nzJustify]="'center'">
      <div nz-form-label nz-col [nzXs]="24" [nzSm]="6" [nzMd]="2">
        <label for="companyStaff">联系人姓名</label>
      </div>
      <div nz-form-control nz-col [nzXs]="20" [nzSm]="8" [nzMd]="6" nzHasFeedback>
        <nz-input [nzType]="'text'" [nzId]="'companyStaff'">
          <ng-template #prefix>
            <i class="anticon anticon-user"></i>
          </ng-template>
        </nz-input>
      </div>
    </div>

    <!-- phoneNumber -->
    <div nz-form-item nz-row [nzType]="'flex'" [nzJustify]="'center'">
      <div nz-form-label nz-col [nzXs]="24" [nzSm]="6" [nzMd]="2">
        <label for="phoneNumber">联系电话</label>
      </div>
      <div nz-form-control nz-col [nzXs]="20" [nzSm]="8" [nzMd]="6" nzHasFeedback>
        <nz-input [nzType]="'text'" [nzId]="'phoneNumber'">
          <ng-template #prefix>
            <i class="anticon anticon-phone"></i>
          </ng-template>
        </nz-input>
      </div>
    </div>

    <!-- email -->
    <div nz-form-item nz-row [nzType]="'flex'" [nzJustify]="'center'">
      <div nz-form-label nz-col [nzXs]="24" [nzSm]="6" [nzMd]="2">
        <label for="email">联系邮箱</label>
      </div>
      <div nz-form-control nz-col [nzXs]="20" [nzSm]="8" [nzMd]="6" nzHasFeedback>
        <nz-input [nzSize]="'large'" formControlName="email" [nzId]="'email'">
          <ng-template #prefix>
            <i class="anticon anticon-mail"></i>
          </ng-template>
        </nz-input>
      </div>
    </div>

    <!-- userName -->
    <div nz-form-item nz-row [nzType]="'flex'" [nzJustify]="'center'" *ngIf="accountType==='dealer'">
      <div nz-form-label nz-col [nzXs]="24" [nzSm]="6" [nzMd]="2">
        <label for="userName">
          <span>用户名
            <nz-tooltip [nzTitle]="'即供应商使用本平台的登陆用户名'">
              <i nz-tooltip class="anticon anticon-question-circle-o"></i>
            </nz-tooltip>
          </span>
        </label>
      </div>
      <div nz-form-control nz-col [nzXs]="20" [nzSm]="8" [nzMd]="6">
        <nz-input [nzType]="'text'" [ngModel]="userName" formControlName="userName" [nzDisabled]="'true'">
        </nz-input>
      </div>
    </div>

    <!-- password -->
    <div nz-form-item nz-row [nzType]="'flex'" [nzJustify]="'center'" *ngIf="accountType==='dealer'">
      <div nz-form-label nz-col [nzXs]="24" [nzSm]="6" [nzMd]="2">
        <label for="password">
          <span>默认密码
            <nz-tooltip [nzTitle]="'可在供应商上列表页重置密码'">
              <i nz-tooltip class="anticon anticon-question-circle-o"></i>
            </nz-tooltip>
          </span>
        </label>
      </div>
      <div nz-form-control nz-col [nzXs]="20" [nzSm]="8" [nzMd]="6">
        <nz-input formControlName="password" [nzType]="'text'" [nzDisabled]="'true'">
        </nz-input>
      </div>
    </div>

    <div nz-form-item class="reeF-center-btn">
      <div nz-form-control>
        <button nz-button [nzSize]="'large'">确定</button>
      </div>
    </div>

  </form>
</div>